<template>
  <div class="box">
    <div>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style lang="less" scoped>
@keyframes myplay {
  from {
    transform: scaleY(0.2);
  }
  to {
    transform: scaleY(1);
  }
}
.box {
  width: 100vw;
  height: 175px;

  div {
    display: flex;
    align-items: center;
    justify-content: center;
    span {
      width: 6px;
      height: 30px;
      background-color: #dd001b;
      margin-left: 3px;
      position: relative;
      display: block;
      transform-origin: bottom;
      animation: myplay 1s linear infinite alternate;
      &.running {
        animation-play-state: running;
      }
      &.pause {
        animation-play-state: paused;
      }
    }
    span:nth-of-type(1) {
      animation-delay: -1s;
    }
    span:nth-of-type(2) {
      animation-delay: -0.75s;
    }
    span:nth-of-type(3) {
      animation-delay: -0.5s;
    }
    span:nth-of-type(4) {
      animation-delay: -0.25s;
    }
  }
}
</style>